/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.group4.highschoolportal.student.backingbean;

import com.group4.controller.LessonFacade;
import com.group4.entity.Lesson;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author José
 */
@ManagedBean
@RequestScoped
public class StudentLessonsBackingBean {
    
    @EJB
    private LessonFacade lessonDb;
    
    private List<Lesson> lessons;

    /** Creates a new instance of StudentLessonsBackingBean */
    public StudentLessonsBackingBean() {
    }

    public void setLessons(List<Lesson> lessons) {
        this.lessons = lessons;
    }
    
    public List<Lesson> getLessons() {
        lessons = lessonDb.findAll();
        return lessons;
    }
}
